home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 4514 < prev    next >
Encoding:
Text File  |  1996-08-05  |  916 b   |  44 lines

  1. Path: p406.asd.euronet.nl!its
  2. From: its@euronet.nl (it's_b.v.)
  3. Newsgroups: comp.lang.c
  4. Subject: BEGINNER --> problem with ATEXIT !!!!
  5. Date: Mon, 5 Feb 1996 13:46:32
  6. Organization: Euronet Internet
  7. Message-ID: <its.2.000DC6F8@euronet.nl>
  8. NNTP-Posting-Host: p406.asd.euronet.nl
  9. Keywords: ATEXIT
  10. X-Newsreader: Trumpet for Windows [Version 1.0 Rev A]
  11.  
  12. Can somebody help me with the following :
  13.  
  14. I use the atexit() function to start a DOS-batchfile when my program ends. 
  15. The memory which this program uses is freed AFTER the batch-file has 
  16. completed.   
  17.  
  18. the program-code looks like this :
  19.  
  20. void batch( void )
  21.     {
  22.        system("\\BATFILE.BAT");
  23.     }
  24.  
  25.  
  26. void main( void )
  27.     {
  28.        atexit( batch );
  29.  
  30.        /* my program code */
  31.  
  32.        exit( 1 );
  33.     } 
  34.  
  35. QUESTION :
  36. Is it possible to free the memory which is used by my program BEFORE the 
  37. batch-file is executed !
  38.  
  39. Thank you 
  40. Ronald van der List
  41. its@euronet.nl
  42.  
  43.  
  44.